<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">相册标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" value='{$vo.title|default=""}' required="required" title="请输入相册标题" placeholder="请输入相册标题" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">相册图片</label>
        <div class='layui-input-block'>

            <!-- todo 默认图片设置 -->
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.image_id|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="image_id" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.image_id|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="ico,png,jpg" data-field="image_id">上传图片</a>
            <p>建议上传商品图片的尺寸为xx px。</p>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">所属品牌</label>
        <div class="layui-input-block">
            <select name='brand_id' >
                <option value="-1">请选择品牌搜索</option>
                {foreach $menusp as $menu}
                {eq name='menu.id' value='$vo.brand_id|default=0'}
                <option selected  value='{$menu.id}'>{$menu.title}</option>
                {else/}
                <option  value='{$menu.id}'>{$menu.title}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">是否显示</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="0" title="正常" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>正常</span></div>
            <input type="radio" name="status" value="1" title="禁用"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>禁用</span></div>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>

<script>window.form.render();</script>